package com.example.lxy.mapper;

import com.example.lxy.pojo.officebuildingelectricity;
import org.apache.ibatis.annotations.*;

import java.util.Date;
import java.util.List;

@Mapper
public interface officebuildingelectricitymapper {
    //写字楼电费查询
    @Select("select xid,DATE_FORMAT(xmonth,'%Y-%m-%d')xmonth,building,zhaodian,kongdian,zodian,money from officebuildingelectricity")
    List<officebuildingelectricity> list();

    //写字楼电费根据xid查询
    @Select("select * from officebuildingelectricity where xid=#{xid}")
    officebuildingelectricity upid(int xid);

    //写字楼电费修改
    @Update("update officebuildingelectricity set zhaodian=#{zhaodian},kongdian=#{kongdian},zodian=#{zodian},money=#{money} where xid=#{xid}")
    void update(officebuildingelectricity off);

    List<officebuildingelectricitymapper> lists(@Param("searchSupplyTimeFrom") String searchSupplyTimeFrom,@Param("searchSupplyTimeTo") String searchSupplyTimeTo,@Param("building") String building);
}
